<%@ tag language="java" pageEncoding="UTF-8"
	trimDirectiveWhitespaces="true"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>


<%@ attribute name="elementId" required="true" type="java.lang.String"
	description="elementId"%>
<%@ attribute name="loadOptionUrl" required="true"
	type="java.lang.String" description="elementId"%>

<div id="${elementId}" style="height:300px;"></div>


<script type="text/javascript">
	var ${elementId}={};
	${elementId}.echarts = echarts.init(document.getElementById('${elementId}'));
	//查询  
    ${elementId}.reload=function() {  
    	 
    	${elementId}.echarts.showLoading({text: '正在努力的读取数据中...'});  
    	$.get('${loadOptionUrl}?elementId=${elementId}', function (data) {
    		eval(data);
            ${elementId}.echarts.setOption(option, true);  
            ${elementId}.echarts.hideLoading();  
        });  
    }  
    //载入图表  
    ${elementId}.reload();
	
	<jsp:doBody></jsp:doBody>
	
	
	
</script>